#ifndef REGISTRY_H
#define REGISTRY_H

#include <windows.h>

namespace util
{
class Registry  
{
public:
	bool isValExist ( const char * valname);
	bool deleteVal  ( const char * valname);
	bool queryVal	( const char * valname, DWORD * valtype, void * valdata, DWORD * valsize );
	bool setVal		( const char * valname, DWORD valtype,   void * valdata, DWORD valsize );
	DWORD create    ( );
    void setParams  ( HKEY hkey, char* subkey );

    static Registry * getInstance ( );

	Registry ( );
	virtual ~Registry();

private:
    static Registry *       m_reg;
	HKEY					m_hKey;
	char*					m_subKey;
	char*					m_class;
	DWORD					m_options;
	REGSAM					m_sam;
	LPSECURITY_ATTRIBUTES	m_secAttrib;
	HKEY					m_hRegKey;
	DWORD					m_result;
};
}
#endif 
